using UnityEditor;
using UnityEngine;

namespace UnityXEditor
{
    internal class AnimationEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            SerializedProperty sp = serializedObject.GetIterator();
            sp.NextVisible(true);//跳过m_Script

            sp.NextVisible(false);
            EditorGUILayout.PropertyField(sp, new GUIContent("延迟"));
            sp.NextVisible(false);
            EditorGUILayout.PropertyField(sp, new GUIContent("时长"));
            sp.NextVisible(false);
            EditorGUILayout.PropertyField(sp, new GUIContent("曲线"));

            while (sp.NextVisible(false))
            {
                EditorGUILayout.PropertyField(sp, true);
            }
            serializedObject.ApplyModifiedProperties();
        }
    }
}